package com.medicine.order.service;

import com.medicine.common.config.RabbitMQConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * @author lynn
 * @version 1.0
 * @date 2022/1/25
 */
@Service
public class OrderService {

    @RabbitListener(queues = RabbitMQConfig.ORDER_QUEUE)
    public void msgs(String msg){
        System.out.println("消费者消费消息了："+msg);
        //TODO 这里可以做异步的工作
    }

    @RabbitListener(queues = RabbitMQConfig.TEST_QUEUE)
    public void msg(String msg){
        System.out.println("消费者消费消息了："+msg);
        //TODO 这里可以做异步的工作
    }
}
